package com.voicechat.firstmet.activity;

import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.voicechat.firstmet.MainActivity;
import com.voicechat.firstmet.R;
import com.voicechat.firstmet.base.BaseActivity;
import com.voicechat.firstmet.utils.StatusBarUtils;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.activity
 * @ClassName: AuditActivity
 * @Description: 相册、共享闺蜜审核中页面
 * @Author: ljp
 * @CreateDate: 2019/1/16 10:18
 * @Version: 1.0
 */
public class AuditActivity extends BaseActivity {
    @BindView(R.id.linear_back)
    LinearLayout linearBack;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.tv_audit_content)
    TextView tvAuditContent;
    @BindView(R.id.tv_look_other)
    TextView tvLookOther;
    private int flag;//0相册审核  1 共享闺蜜审核

    @Override
    protected int setStatusBarColor() {
        return 0;
    }

    @Override
    protected boolean isSettingStatusBarText() {
        return false;
    }

    @Override
    protected int loadLayout() {
        return R.layout.activity_audit;
    }

    @Override
    protected void initLayout(Bundle savedInstanceState) {
        ButterKnife.bind(this);
        //透明状态栏
        StatusBarUtils.Full(this);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            this.getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        }
        flag = getIntent().getIntExtra("flag",-1);
        initView();
    }
    /**
    * @method
    * @description 数据控件实例化
    * @date: 2019/1/16 10:29
    * @author: ljp
    * @return
    */
    private void initView() {
        if(flag == 0){
            tvTitle.setText("相册审核");
            tvAuditContent.setText(getResources().getString(R.string.share_photo_audit));
            tvLookOther.setVisibility(View.VISIBLE);
        }else {
            tvTitle.setText("共享闺蜜审核");
            tvAuditContent.setText(getResources().getString(R.string.share_girls_audit));
            tvLookOther.setVisibility(View.GONE);
        }
    }
    @OnClick({R.id.linear_back, R.id.tv_look_other})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.linear_back:
                finish();
                break;
            case R.id.tv_look_other:
                Intent intent = new Intent(activity, MainActivity.class);
                intent.putExtra("flag",0);
                startActivity(intent);
                finish();
                break;
        }
    }
}
